package com.ghck.server.exception;

public class ErrorConstant {

    private Integer errorCode;
    private String msg;
    

    public ErrorConstant(Integer errorCode,String msg) {
		super();
		this.errorCode = errorCode;
		this.msg = msg;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Integer getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(Integer errorCode) {
        this.errorCode = errorCode;
    }

    
    public static final ErrorConstant SUCCESS = new ErrorConstant(0, "请求成功");
    
    
    /************* 未知异常 *****************/
    public static final ErrorConstant UNKNOWN_ERROR= new ErrorConstant(100000, "系统错误");
    public static final ErrorConstant OUT_OF_BUNDRY = new ErrorConstant(100001, "下标越界!");
    public static final ErrorConstant SERVER_ERROR = new ErrorConstant(100002, "服务器处理异常");
    /************* 数据库异常 *****************/
    public static final ErrorConstant DB_ERROR= new ErrorConstant(200000, "数据库错误");
    /************* 参数异常 *****************/
    public static final ErrorConstant PARAM_ERROR = new ErrorConstant(300000, "参数错误");
    public static final ErrorConstant ACCOUNT_NOT_FOUND = new ErrorConstant(300001, "账户不存在");
    public static final ErrorConstant INVALID_PHONE_NUM = new ErrorConstant(300002, "非法手机号");
    public static final ErrorConstant LIMIT_OVER_SIZE_20 = new ErrorConstant(300003, "Limit不能为空或大于20!");
    public static final ErrorConstant ARTICLE_NOT_NULL = new ErrorConstant(300004, "文章不能为空");
    public static final ErrorConstant SUGGEST_NOT_NULL = new ErrorConstant(300005, "建议内容不能为空");
    public static final ErrorConstant FILE_OVER_SIZE = new ErrorConstant(300006, "文件太大");
    public static final ErrorConstant INVALID_BANK_CARD = new ErrorConstant(300007, "无效银行卡");
    public static final ErrorConstant DOCTOR_NOT_NULL = new ErrorConstant(300008, "医生账号不能为空");
    public static final ErrorConstant MESSAGE_PICTURE_TOO_BIG = new ErrorConstant(300009, "消息图片尺寸过大");
    public static final ErrorConstant MESSAGE_AUDIO_TOO_BIG = new ErrorConstant(300010, "语音消息文件过大");
    public static final ErrorConstant MESSAGE_TYTE_MISMATCH = new ErrorConstant(300011, "消息类型错误");
    public static final ErrorConstant COMMENT_NOT_NULL = new ErrorConstant(300012, "评论ID不能为空");
    public static final ErrorConstant COMMENT_CONTENT_NOT_NULL = new ErrorConstant(300013, "回复内容不能为空");
    public static final ErrorConstant KNOWLEDGE_TITLE_NOT_NULL = new ErrorConstant(300014, "文章标题不能为空");
    public static final ErrorConstant KNOWLEDGE_URL_NOT_NULL = new ErrorConstant(300015, "文章链接不能为空");
    public static final ErrorConstant KNOWLEDGE_SEND_OBJ_NOT_NULL = new ErrorConstant(300016, "发送对象不能为空");
    public static final ErrorConstant KNOWLEDGE_SEARCH_KEYWORD_NOT_NULL = new ErrorConstant(300017, "搜索关键字不能为空");
    /************* 业务异常 *****************/
    public static final ErrorConstant OPERATION_ERROR = new ErrorConstant(400000, "业务处理异常");
    public static final ErrorConstant BAD_VERIFICATION_CODE = new ErrorConstant(400001, "验证码不正确");
    public static final ErrorConstant UNAUTHORIZED = new ErrorConstant(400002, "认证没有通过");
    public static final ErrorConstant CERTIFICATION_AUTHORITY_FAILS = new ErrorConstant(400003, "权限认证失败");
    public static final ErrorConstant ARTICLE_NOT_FOUNT = new ErrorConstant(400004, "该文章已不存在");
    public static final ErrorConstant AUTH_INFO_NOT_FOUND = new ErrorConstant(400005, "认证信息不存在");
    public static final ErrorConstant BAD_SIGNATURE = new ErrorConstant(400006, "签名不正确");
    public static final ErrorConstant CREDENTIALS_EXPIRED = new ErrorConstant(400007, "密码已过期");
    public static final ErrorConstant BAD_CREDENTIALS = new ErrorConstant(400008, "密码不正确");
    public static final ErrorConstant DECRYPT_PASSWORD_CODE = new ErrorConstant(400009, "解密的password为空");
    public static final ErrorConstant ENCRYPT_PASSWORD_CODE = new ErrorConstant(400010, "加密的password为空");
    public static final ErrorConstant ILLEGAL_OPERATE = new ErrorConstant(400011, "非法操作");
    public static final ErrorConstant OLD_BAD_CREDENTIALS = new ErrorConstant(400012, "老密码不正确");
    public static final ErrorConstant ACCOUNT_EXISTS = new ErrorConstant(400013, "账户已存在");
    public static final ErrorConstant NO_RELATIONSHIP_BETWEEN_DOCTOR_PATIENT = new ErrorConstant(400014, "医患关系不存在！");
    public static final ErrorConstant PHONE_NUM_NOT_FOUND = new ErrorConstant(400015, "手机号码不存在");
    public static final ErrorConstant INVALID_VERIFICAITON_CODE_GENERATION = new ErrorConstant(400016, "生成验证码请求无效");
    public static final ErrorConstant ACCOUNT_IS_BLOCKED = new ErrorConstant(400017, "账号已锁定");
    public static final ErrorConstant RECOMMAND_CODE_ERROR = new ErrorConstant(400018, "推荐码指定的医生账号不存在!");
    public static final ErrorConstant RECOMMAND_PATIENT_CODE_ERROR = new ErrorConstant(400019, "邀请码指定的糖友账号不存在!");
    public static final ErrorConstant ACCOUNT_NOT_LOGIN = new ErrorConstant(400020, "未登录!");
    public static final ErrorConstant SMS_SEND_BUSY = new ErrorConstant(400021, "同一条消息发送太频繁，请稍后再试试！");
    public static final ErrorConstant DOCTOR_NOT_FOUND = new ErrorConstant(400022, "医生不存在");
    
    //前端收到401003，会跳转到登录界面
    public static final ErrorConstant ACCOUNT_EXPIRED = new ErrorConstant(401003, "账户已过期");
    
}